package cn.mooncode.basketballManage.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author jwz
 * @since 2021-03-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_match")
@ApiModel(value="Match对象", description="")
public class Match implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "比赛表主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "比赛开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "比赛结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "比赛结果")
    private String result;

    @ApiModelProperty(value = "比赛队伍一")
    @TableField(exist = false)
    private Team team1;

    @ApiModelProperty(value = "比赛队伍二")
    @TableField(exist = false)
    private Team team2;

    @ApiModelProperty(value = "比赛场地")
    @TableField(exist = false)
    private Space space;

    @ApiModelProperty(value = "教练表主键")
    @TableField(exist = false)
    private Integer cid;

}
